// TypeScript file
module view{
    export class GameViewGameRulePanel extends eui.Component {
            public exit: eui.Button
            public difen:eui.Label
            public jushu1:eui.Label
            public jushu2:eui.Label
            public wangfa:eui.Label
            public moshi:eui.Label

            public constructor(){
                super(); 
                this.skinName=view.GameViewGameRule;
                this.exit.addEventListener(egret.TouchEvent.TOUCH_TAP, this.QuXiao, this)
               
                this.difen.text= window.localStorage.getItem("score_type") +"分";
                if( window.localStorage.getItem("ticket_type") == "1"){
                    this.jushu1.text="10";
                    this.jushu2.text="（x2房卡）";
                }
                if( window.localStorage.getItem("ticket_type") == "2"){
                    this.jushu1.text="20";
                    this.jushu2.text="（x4房卡）";
                }
                if(window.localStorage.getItem("rule_type") == "1"){
                    this.wangfa.text="有大小王"
                }else{
                    this.wangfa.text="无大小王"
                }
                if(window.localStorage.getItem("banker_mode") == "3"){
                    this.moshi.text="自由抢庄"
                }else if(window.localStorage.getItem("banker_mode") == "5"){
                    this.moshi.text="大混战"
                }else{
                     this.moshi.text="九点上庄"
                }//庄家模式
                
              }

            private QuXiao(e: egret.TouchEvent): void {//取消
                this.dispatchEventWith("quxiaoskin");
            }
    }
}